//
//  ZYHColLabBtnCell.m
//  RcuClient
//
//  Created by 周宇航 on 2017/1/12.
//  Copyright © 2017年 zyh. All rights reserved.
//

#import "ZYHColLabBtnCell.h"

@implementation ZYHColLabBtnCell

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        // 初始化时加载collectionCell.xib文件
        NSArray *arrayOfViews =
        [[NSBundle mainBundle] loadNibNamed:@"ZYHColLabBtnCell"
                                      owner:self
                                    options:nil];
        
        // 如果路径不存在，return nil
        if (arrayOfViews.count < 1) {
            return nil;
        }
        // 如果xib中view不属于UICollectionViewCell类，return nil
        if (![[arrayOfViews objectAtIndex:0]
              isKindOfClass:[UICollectionViewCell class]]) {
            return nil;
        }
        // 加载nib
        self = [arrayOfViews objectAtIndex:0];
         NSString * device=[UIDevice currentDevice].model;
        if([device isEqualToString:@"iPhone"]){
            self.nameLab.font=[UIFont systemFontOfSize:11];
        }else{
            NSRange range = [device rangeOfString:@"iPad"];
            if(range.location != NSNotFound){
                self.nameLab.font=[UIFont systemFontOfSize:20];
            }
        }
        
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
